package com.link.base.base.stocksellstorage.service;

import com.link.base.base.stocksellstorage.dao.mybatis.mapper.StorageProdMapper;
import com.link.base.base.stocksellstorage.model.StorageProd;
import com.link.core.basic.dao.mapper.BasicMapper;
import com.link.core.basic.dao.siebel.mapper.BasicMapperSiebel;
import com.link.core.basic.service.BasicServiceImpl;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author unknown
 * @date unknown
 */
@Component
public class StorageProdServiceImpl extends BasicServiceImpl<StorageProd> implements StorageProdService {
    @Resource
    StorageProdMapper mapper;

    @Override
    public BasicMapper<StorageProd> getBasicMapper() throws Exception {
        return mapper;
    }

    @Override
    public BasicMapperSiebel<StorageProd> getSiebelBasicMapper() throws Exception {

        return null;
    }

    @Override
    public List<StorageProd> queryStorageProdsByStockId(StorageProd entity) throws Exception {
        return mapper.queryStorageProdsByStockId(entity);
    }

    /**
     * 记录计数：根据盘点头Id查询相关的库存产品
     *
     * @param entity
     * @return
     */
    @Override
    public int countStorageProdsByStockId(StorageProd entity) throws Exception {
        return mapper.countStorageProdsByStockId(entity);
    }

}
